package com.zhiliao.comb.demo1;

import java.util.List;

/**
 * 作者： zhi-liao
 * 类的作用:
 * 类的创建时间： 2021/5/23 17:35
 */
public class Client {
    public static void main(String[] args) {
        Employer pm = new ProjectManager("项目经理");
        Employer pa = new ProjectAssistant("项目助理");
        Employer p1Employer = new Programmer("程序员一");
        Employer p2Employer = new Programmer("程序员二");

        pm.add(pa);// 为项目经理添加项目助理
        pm.add(p1Employer); // 为项目经理添加程序员


        List<Employer> employers = pm.getEmployers();
        for (Employer employer : employers) {
            System.out.println(employer.getName());
        }
    }
}
